package org.genko.model;

public interface MemberDefinition
{
	/**
	 * Returns the Name of this Member
	 * @return the Name of this Member
	 */
	String getMemberDefinitionName();
	
	/**
	 * @return true if this object is an attribute, false otherwise
	 */
	boolean isAttributeMember();

	/**
	 * @return true if this object is an element, false otherwise
	 */
	boolean isElementMember();
	
	/**
	 * Returns true if the object of this type is a reference to other object
	 * @return true if the object of this type is a reference to other object, false otherwise
	 */
	boolean isReferenceMember();
	
	/**
	 * @return true if this object is read only, false otherwise
	 */
	boolean isReadOnlyMember();

	/**
	 * @return true if the member is nullable, false otherwise
	 */
	boolean isNullable();

	/**
	 * Returns the Type of this Member
	 * @return the Type of this Member
	 */
	MemberType getMemberDefinitionType();
	
	/**
	 * Returns the Cardinality of this Member
	 * @return the Cardinality of this Member
	 */
	MemberCardinality getMemberCardinality();
	
	/**
	 * Returns the default value of this Member
	 * @return the default value of this Member
	 */
	Object getDefaultValue();
	
	/**
	 * Creates a new member object based on its definition
	 * @return a new member object based on its definition
	 */
	MemberObject createMember();
}
